package com.sunny.fetch.pojo;

import javax.persistence.*;

@Table(name = "f_fut_settle")
public class FFutSettle {
    @Id
    private Long tid;

    /**
     * 合约代码
     */
    @Column(name = "ts_code")
    private String tsCode;

    /**
     * 交易日期
     */
    @Column(name = "trade_date")
    private String tradeDate;

    /**
     * 结算价
     */
    private Float settle;

    /**
     * 交易手续费率
     */
    @Column(name = "trading_fee_rate")
    private Float tradingFeeRate;

    /**
     * 交易手续费
     */
    @Column(name = "trading_fee")
    private Float tradingFee;

    /**
     * 交割手续费
     */
    @Column(name = "delivery_fee")
    private Float deliveryFee;

    /**
     * 买套保交易保证金率
     */
    @Column(name = "b_hedging_margin_rate")
    private Float bHedgingMarginRate;

    /**
     * 卖套保交易保证金率
     */
    @Column(name = "s_hedging_margin_rate")
    private Float sHedgingMarginRate;

    /**
     * 买投机交易保证金率
     */
    @Column(name = "long_margin_rate")
    private Float longMarginRate;

    /**
     * 卖投机交易保证金率
     */
    @Column(name = "short_margin_rate")
    private Float shortMarginRate;

    /**
     * 平今仓手续率
     */
    @Column(name = "offset_today_fee")
    private Float offsetTodayFee;

    /**
     * 交易所
     */
    private String exchange;

    public FFutSettle(Long tid, String tsCode, String tradeDate, Float settle, Float tradingFeeRate, Float tradingFee, Float deliveryFee, Float bHedgingMarginRate, Float sHedgingMarginRate, Float longMarginRate, Float shortMarginRate, Float offsetTodayFee, String exchange) {
        this.tid = tid;
        this.tsCode = tsCode;
        this.tradeDate = tradeDate;
        this.settle = settle;
        this.tradingFeeRate = tradingFeeRate;
        this.tradingFee = tradingFee;
        this.deliveryFee = deliveryFee;
        this.bHedgingMarginRate = bHedgingMarginRate;
        this.sHedgingMarginRate = sHedgingMarginRate;
        this.longMarginRate = longMarginRate;
        this.shortMarginRate = shortMarginRate;
        this.offsetTodayFee = offsetTodayFee;
        this.exchange = exchange;
    }

    public FFutSettle() {
        super();
    }

    /**
     * @return tid
     */
    public Long getTid() {
        return tid;
    }

    /**
     * @param tid
     */
    public void setTid(Long tid) {
        this.tid = tid;
    }

    /**
     * 获取合约代码
     *
     * @return ts_code - 合约代码
     */
    public String getTsCode() {
        return tsCode;
    }

    /**
     * 设置合约代码
     *
     * @param tsCode 合约代码
     */
    public void setTsCode(String tsCode) {
        this.tsCode = tsCode;
    }

    /**
     * 获取交易日期
     *
     * @return trade_date - 交易日期
     */
    public String getTradeDate() {
        return tradeDate;
    }

    /**
     * 设置交易日期
     *
     * @param tradeDate 交易日期
     */
    public void setTradeDate(String tradeDate) {
        this.tradeDate = tradeDate;
    }

    /**
     * 获取结算价
     *
     * @return settle - 结算价
     */
    public Float getSettle() {
        return settle;
    }

    /**
     * 设置结算价
     *
     * @param settle 结算价
     */
    public void setSettle(Float settle) {
        this.settle = settle;
    }

    /**
     * 获取交易手续费率
     *
     * @return trading_fee_rate - 交易手续费率
     */
    public Float getTradingFeeRate() {
        return tradingFeeRate;
    }

    /**
     * 设置交易手续费率
     *
     * @param tradingFeeRate 交易手续费率
     */
    public void setTradingFeeRate(Float tradingFeeRate) {
        this.tradingFeeRate = tradingFeeRate;
    }

    /**
     * 获取交易手续费
     *
     * @return trading_fee - 交易手续费
     */
    public Float getTradingFee() {
        return tradingFee;
    }

    /**
     * 设置交易手续费
     *
     * @param tradingFee 交易手续费
     */
    public void setTradingFee(Float tradingFee) {
        this.tradingFee = tradingFee;
    }

    /**
     * 获取交割手续费
     *
     * @return delivery_fee - 交割手续费
     */
    public Float getDeliveryFee() {
        return deliveryFee;
    }

    /**
     * 设置交割手续费
     *
     * @param deliveryFee 交割手续费
     */
    public void setDeliveryFee(Float deliveryFee) {
        this.deliveryFee = deliveryFee;
    }

    /**
     * 获取买套保交易保证金率
     *
     * @return b_hedging_margin_rate - 买套保交易保证金率
     */
    public Float getbHedgingMarginRate() {
        return bHedgingMarginRate;
    }

    /**
     * 设置买套保交易保证金率
     *
     * @param bHedgingMarginRate 买套保交易保证金率
     */
    public void setbHedgingMarginRate(Float bHedgingMarginRate) {
        this.bHedgingMarginRate = bHedgingMarginRate;
    }

    /**
     * 获取卖套保交易保证金率
     *
     * @return s_hedging_margin_rate - 卖套保交易保证金率
     */
    public Float getsHedgingMarginRate() {
        return sHedgingMarginRate;
    }

    /**
     * 设置卖套保交易保证金率
     *
     * @param sHedgingMarginRate 卖套保交易保证金率
     */
    public void setsHedgingMarginRate(Float sHedgingMarginRate) {
        this.sHedgingMarginRate = sHedgingMarginRate;
    }

    /**
     * 获取买投机交易保证金率
     *
     * @return long_margin_rate - 买投机交易保证金率
     */
    public Float getLongMarginRate() {
        return longMarginRate;
    }

    /**
     * 设置买投机交易保证金率
     *
     * @param longMarginRate 买投机交易保证金率
     */
    public void setLongMarginRate(Float longMarginRate) {
        this.longMarginRate = longMarginRate;
    }

    /**
     * 获取卖投机交易保证金率
     *
     * @return short_margin_rate - 卖投机交易保证金率
     */
    public Float getShortMarginRate() {
        return shortMarginRate;
    }

    /**
     * 设置卖投机交易保证金率
     *
     * @param shortMarginRate 卖投机交易保证金率
     */
    public void setShortMarginRate(Float shortMarginRate) {
        this.shortMarginRate = shortMarginRate;
    }

    /**
     * 获取平今仓手续率
     *
     * @return offset_today_fee - 平今仓手续率
     */
    public Float getOffsetTodayFee() {
        return offsetTodayFee;
    }

    /**
     * 设置平今仓手续率
     *
     * @param offsetTodayFee 平今仓手续率
     */
    public void setOffsetTodayFee(Float offsetTodayFee) {
        this.offsetTodayFee = offsetTodayFee;
    }

    /**
     * 获取交易所
     *
     * @return exchange - 交易所
     */
    public String getExchange() {
        return exchange;
    }

    /**
     * 设置交易所
     *
     * @param exchange 交易所
     */
    public void setExchange(String exchange) {
        this.exchange = exchange;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", tsCode=").append(tsCode);
        sb.append(", tradeDate=").append(tradeDate);
        sb.append(", settle=").append(settle);
        sb.append(", tradingFeeRate=").append(tradingFeeRate);
        sb.append(", tradingFee=").append(tradingFee);
        sb.append(", deliveryFee=").append(deliveryFee);
        sb.append(", bHedgingMarginRate=").append(bHedgingMarginRate);
        sb.append(", sHedgingMarginRate=").append(sHedgingMarginRate);
        sb.append(", longMarginRate=").append(longMarginRate);
        sb.append(", shortMarginRate=").append(shortMarginRate);
        sb.append(", offsetTodayFee=").append(offsetTodayFee);
        sb.append(", exchange=").append(exchange);
        sb.append("]");
        return sb.toString();
    }
}